<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:o="http://openfaces.org/"
      xmlns:ui="http://java.sun.com/jsf/facelets">

<head>
</head>
<body>
	<ui:composition template="/templates/default.xhtml">
	 	<ui:define name="title">OpenHDS - Residency Details</ui:define>
	
		<ui:param name="crud" value="#{residencyCrud}" />
		
		<ui:define name="listing">
			<ui:include src="list.xhtml" />
		</ui:define>
		<ui:define name="display">
		
			<h:outputText value="#{navController.breadcrumbTrail}" />
		
	        <h1>#{msg.residencyDetail}</h1>
	        <h:messages id="errors" globalOnly="true"/>
	        <h:form>
	        
	        	<h:outputText styleClass="error" value="#{residencyCrud.item.statusMessage}" />
	        
	            <h:panelGrid columns="3">
	            	<h:outputText value="#{msg.individualId}:"/>
	            	<h:outputText />
	                <h:outputText id="indiv" value="#{residencyCrud.item.individual}" converter="#{individualExtIdConverter}" />
	            	
	            	<h:outputText value="#{msg.locationId}:"/>
	                <h:outputText />
	                <h:outputText id="loc" value="#{residencyCrud.item.location}" converter="#{locationExtIdConverter}" />
	            	
	            	<h:outputText value="#{msg.residencyStartDate}:"/>
	                <h:outputText />
	                <h:outputText id="startDate" value="#{residencyCrud.item.startDate}" converter="#{calendarConverter}" />
                    
                    <h:outputText value="#{msg.residencyStartType}:"/>
                    <img class="clickable" onclick="O$('popupWindowForResidencyStartTypeCodes').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                    <h:outputText value="#{residencyCrud.item.startType}" size="1" id="startType" />
	            	
	            	<h:outputText value="#{msg.residencyEndDate}:"/>
	                <h:outputText />
	                <h:outputText id="endDate" value="#{residencyCrud.item.endDate}" converter="#{calendarConverter}" />
                    
                    <h:outputText value="#{msg.residencyEndType}:"/>
                    <img class="clickable" onclick="O$('popupWindowForResidencyEndTypeCodes').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                    <h:outputText value="#{residencyCrud.item.endType}" size="1" id="endType" />
                    
                    <h:outputText value="#{msg.insertDate}:"/>
                	<h:outputText />
                	<h:outputText value="#{residencyCrud.item.insertDate}" converter="#{calendarConverter}" />
  				
  					<h:outputText value="#{msg.insertBy}:"/>
  					<h:outputText />
					<h:outputText value="#{residencyCrud.item.insertBy.fullName}" />
				                    
                    <h:outputText value="#{msg.dataStatus}:"/>
		    		<img class="clickable" onclick="O$('popupWindowForDataStatus').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
					<h:outputText value="#{residencyCrud.item.status}" />	
	            </h:panelGrid>
	        </h:form>
		</ui:define>
	</ui:composition>
  </body>
</html>
